home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- ####################################################################################
- # #
- # Copyright (c) 1996, Sun Microsystems Computer Corporation, Mountain View, CA #
- # #
- # All Rights Reserved #
- # #
- # Sun Microsystems Computer Corporation disclaims all warranties with #
- # regard to this software, including all implied warranties of merchantability #
- # and fitness. In no event will Sun Microsystems Inc., Sun Microsystems #
- # Computer Corporation or any Sun Microsystems Inc. company, its employees #
- # or agents be liable for direct, incidental or consequential damages #
- # resulting from loss of data or business opportunities, resulting from the #
- # Ultracomputing Demo CD, or any part of same, either alone or in conjunction #
- # with other programs. #
- # #
- # The software contained on these discs is distributed as is, at no additional #
- # charge. As such, it is excluded from any pre-existing customer service #
- # or support agreements with Sun Microsystems. An email form is provided in #
- # the main demo menu to direct comments, feedback and technical questions #
- # relating strictly to Ultrapack, the demos and usage thereof. #
- # #
- # run_demo: #
- # #
- # Executable shell script for starting up the UltraPack #
- # SMCC Desktop Systems Engineering #
- # March 1996 #
- # #
- ####################################################################################
- echo "Loading, Please Wait .........."
-
- if [ "$ULTRA_PACK_HOME" = "" ]; then
- ULTRA_PACK_HOME=/cdrom/cdrom0
- export ULTRA_PACK_HOME
- fi
-
- if [ "$DEMO_BROWSER" = "" ]; then
- HOTJAVAHOME=$ULTRA_PACK_HOME/HotJava
- else
- echo "Using alternate directory for HotJava"
- echo "Loading from: " $DEMO_BROWSER
- HOTJAVAHOME=$DEMO_BROWSER;
- fi
-
- export ULTRA_PACK_HOME
- DIR=$ULTRA_PACK_HOME
- export DIR
- #
- /bin/stty istrip
-
- # This next section performs some magic tricks to prevent
- # HotJava from overriding the user's existing preferences.
- # By re-directing the $HOME env var to /tmp, HotJava will
- # look for a preferences file which we've created specifically
- # for Ultrapack -- however, this also implies having some other
- # important files in the new "home" directory such as the Xdefaults
- # file and Xauthority file.
- #
- cd /tmp
-
- if [ -w /tmp/.Xdefaults ]; then
- rm /tmp/.Xdefaults;
- fi
-
- if [ -w /tmp/.Xauthority ]; then
- rm /tmp/.Xauthority;
- fi
-
- if [ -w /tmp/.mailcap ]; then
- rm /tmp/.mailcap;
- fi
-
- if [ -d /tmp/.hotjava ]; then
- rm -rf /tmp/.hotjava;
- fi
- #
- # Unroll a temporary user directory in /tmp for
- # HotJava so we don't step on the user's defaults.
- #
- tar xf $ULTRA_PACK_HOME/WWW/HotJavaPrefs.tar
- cp $HOME/.Xauthority /tmp/.
- HOME=/tmp
- export HOME
- #
- DISPLAY=:0.0
- export DISPLAY
- /usr/openwin/bin/xhost `/usr/bin/uname -n`
-
- # The next set of variables are for specific libraries
- # and home variables of application components that we
- # already know about. If other applications are added
- # to the web, this is the place to define their env vars.
- #
- MOTIFHOME=/usr/dt
- export MOTIFHOME
-
- XGLHOME=/opt/SUNWits/Graphics-sw/xgl
- export XGLHOME
-
- XILHOME=/opt/SUNWits/Graphics-sw/xil
- export XILHOME
-
- LEOTOOL2HOME=$ULTRA_PACK_HOME/holoview
- export LEOTOOL2HOME
-
- TCL_LIBRARY=$LEOTOOL2HOME/lib/tcl
- export TCL_LIBRARY
-
- XGLVRHOME=$LEOTOOL2HOME
- export XGLVRHOME
-
- JAVAHOME=$ULTRA_PACK_HOME/java
-
- CLASSPATH=$ULTRA_PACK_HOME/WWW/classes:$HOTJAVAHOME/lib/classes.zip:$JAVAHOME/lib
- export CLASSPATH
-
- # The library path really shouldn't require setting, but we
- # use it for debugging and testing purposes from time to time
- # and you might want to as well....
- #
- LD_LIBRARY_PATH=/usr/openwin/lib:$XGLVRHOME/lib:$XGLHOME/lib:$MOTIFHOME/lib:$LEOTOOL2HOME:$XILHOME/lib
- export LD_LIBRARY_PATH
- PATH=/opt/SUNWspro/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/bin:/usr/sbin:/usr/ucb:/etc
- export PATH
-
- cd $ULTRA_PACK_HOME/WWW
-
- #
- # Figure out which video mode the user is in and display HotJava properly.
- #
- /usr/openwin/bin/xdpyinfo | grep 1280 > /tmp/vidmode
- if [ -s /tmp/vidmode ]; then
- rm -f /tmp/vidmode;
- $HOTJAVAHOME/bin/hotjava $ULTRA_PACK_HOME/WWW/h0.html
- else
- rm -f /tmp/vidmode;
- $HOTJAVAHOME/bin/hotjava $ULTRA_PACK_HOME/WWW/h0.html
- fi
- #
- #
- # Clean up after ourselves
- cd /tmp
-
- if [ -w /tmp/.Xdefaults ]; then
- rm /tmp/.Xdefaults;
- fi
-
- if [ -w /tmp/.Xauthority ]; then
- rm /tmp/.Xauthority;
- fi
-
- if [ -w /tmp/.mailcap ]; then
- rm /tmp/.mailcap;
- fi
-
- if [ -d /tmp/.hotjava]; then
- rm -rf /tmp/.hotjava;
- fi
-